function $g(o){
    return document.getElementById(o);
}
function setMenu(o,f){
    var tags = $g('sub-menu').getElementsByTagName('UL');
    var menus = $g('menu').getElementsByTagName('LI');
    for (j=0;j<tags.length;j++) $g(tags[j].id).style.display = tags[j].id==o?'block':'none';
    for (i=0;i<menus.length;i++) menus[i].className = 'none';
    f.className = 'focus';
}
function beginMenu(o){
    $g(o).style.display = '';
}
var wordCounts = function() {
    var counts = 140 - $g('message').value.length;
    $g('wordcounts').innerHTML = counts;
}